# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=colorcet
pkgname=python-${_pkg}
pkgver=3.0.1
pkgrel=3
pkgdesc="Set of useful perceptually uniform colormaps for plotting scientific data"
arch=(any)
url="https://colorcet.holoviz.org/"
license=(BSD)
depends=(python-pyct)
makedepends=(python-setuptools)
checkdepends=(python-pytest)
source=(https://github.com/holoviz/colorcet/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
#source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
sha256sums=('e44cc4b6b6f4d626927323eec6b9936081b9e5a4fed59e31a00f50f0bee67e42')

build() {
  cd ${_pkg}-${pkgver}
  python setup.py build
}

check() {
  cd ${_pkg}-${pkgver}
  pytest --color=yes colorcet
}

package() {
  cd ${_pkg}-${pkgver}
  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
  install -Dm644 LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}
}
